package com.ruge.ruge_novel_front.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 创建人 ：爱丽丝、如歌
 * 创建时间 ：2019/11/16  13:17
 * 描述 ：小说页面跳转 汇总
 */
@Controller
public class IndexNovelController {
    @GetMapping("")
    public String index() {
        return "novel/index";
    }

    @GetMapping("/search")
    public String search() {
        return "novel/search";
    }

    @GetMapping("/searchresult/{keyword}")
    public String searchresult(@PathVariable("keyword") String keyword) {
        return "novel/searchresult";
    }

    @GetMapping("/chapter/{id}")
    public String chapter(@PathVariable("id") String id) {
        return "novel/chapter";
    }

    @GetMapping("/context/{chapterId}/{type}")
    public String context(
                          @PathVariable("chapterId") Integer chapterId,
                          @PathVariable("type") Integer type) {
        return "novel/context";
    }
}
